From: Matthias Clasen Date: Fri, 5 May 2023 15:35:35 +0000 (-0400) Subject: gsk: Better handling of offscreens X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~59^2^2~308^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=81fd9741fff111f2347ebac546a090a9ef5f974a;p=gtk4.git gsk: Better handling of offscreens Take the scale into account for sizing the offscreens for masks, blends and cross-fades. --- diff --git a/gsk/gl/gskglrenderjob.c b/gsk/gl/gskglrenderjob.c index dc1be07d98..25943c3fe1 100644 --- a/gsk/gl/gskglrenderjob.c +++ b/gsk/gl/gskglrenderjob.c @@ -2824,7 +2824,7 @@ gsk_gl_render_job_visit_cross_fade_node (GskGLRenderJob *job, offscreen_end.reset_clip = TRUE; offscreen_end.bounds = &node->bounds; - gsk_gl_render_job_set_modelview (job, NULL); + gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, fabs (job->scale_x), fabs (job->scale_y))); if (!gsk_gl_render_job_visit_node_with_offscreen (job, start_node, &offscreen_start)) { @@ -3243,7 +3243,7 @@ gsk_gl_render_job_visit_blend_node (GskGLRenderJob *job, bottom_offscreen.force_offscreen = TRUE; bottom_offscreen.reset_clip = TRUE; - gsk_gl_render_job_set_modelview (job, NULL); + gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, fabs (job->scale_x), fabs (job->scale_y))); /* TODO: We create 2 textures here as big as the blend node, but both the * start and the end node might be a lot smaller than that. */ @@ -3312,7 +3312,7 @@ gsk_gl_render_job_visit_mask_node (GskGLRenderJob *job, mask_offscreen.reset_clip = TRUE; mask_offscreen.do_not_cache = TRUE; - gsk_gl_render_job_set_modelview (job, NULL); + gsk_gl_render_job_set_modelview (job, gsk_transform_scale (NULL, fabs (job->scale_x), fabs (job->scale_y))); /* TODO: We create 2 textures here as big as the mask node, but both * nodes might be a lot smaller than that.